<?php

namespace Home\Controller;

class DanshuangController extends CommonController {
	function index() {
		dump ( strlen ( "01289" ) );
		
		$a = '51389';
		for($i = 0; $i < strlen ( $a ); $i ++) {
			$a_arr [$i] = substr ( $a, $i, 1 );
		}
		dump ( $a_arr );
		die ();
		$this->display ();
	}
	function ds() {
		// 周期
		if (I ( "zhouqi" ) == null) {
			$zhouqi = 3;
		} else {
			$zhouqi = I ( "zhouqi" );
		}
		// 定码
		if (I ( "disnum" ) == null) {
			$disnum = 1;
		} else {
			$disnum = 1;
		}
		//公式
		if (I ( "gongshi" ) == null) {
			$gongshi = 1;
		} else {
			$gongshi = I ( "gongshi" );
		}
		switch ($gongshi) {
			case 1:
				$gongshi_m = 'GsTjr10';
				break;
			case 2:
				$gongshi_m = 'GsTjr20';
				break;
			case 3:
				$gongshi_m = 'GsTjr50';
				break;
			case 4:
				$gongshi_m = 'GsTjr100';
				break;
			case 5:
				$gongshi_m = 'GsTjr500';
				break;
			case 6:
				$gongshi_m = 'GsTjr1000';
				break;
			case 7:
				$gongshi_m = 'GsTjl10';
				break;
			case 8:
				$gongshi_m = 'GsTjl20';
				break;
			case 9:
				$gongshi_m = 'GsTjl50';
				break;
			case 10:
				$gongshi_m = 'GsTjl100';
				break;
			case 11:
				$gongshi_m = 'GsTjl500';
				break;
			case 12:
				$gongshi_m = 'GsTjl1000';
				break;
				case 13:
					$gongshi_m = 'TjSj';
					break;
				case 14:
					$gongshi_m = 'TjSm';
					break;
				case 15:
					$gongshi_m = 'TjSm23';
					break;
					case 16 :
						$gongshi_m = 'TjSj1';
						break;
					case 17 :
						$gongshi_m = 'TjSj2';
						break;
					case 18 :
						$gongshi_m = 'TjSj3';
						break;
					case 19 :
						$gongshi_m = 'TjSj4';
						break;
					case 20 :
						$gongshi_m = 'TjSj5';
						break;
					case 21 :
						$gongshi_m = 'TjSj6';
						break;
					case 22 :
						$gongshi_m = 'TjSj7';
						break;
					case 23 :
						$gongshi_m = 'TjSj8';
						break;
					case 24 :
						$gongshi_m = 'TjSj9';
						break;
					case 25 :
						$gongshi_m = 'TjSj10';
						break;
			default:
				$gongshi_m = 'TjSj';
			break;
		}
		//位数
		if (I ( "weishu" ) == null) {
			$weishu = 1;//个位
		} else {
			$weishu = I ( "weishu" );
		}
		switch ($weishu) {
			case 1:
				$weishu_arr['weishu'] = 'ge';
				$weishu_arr['hs'] = 'h5';
				break;
			case 2:
				$weishu_arr['weishu'] = 'shi';
				$weishu_arr['hs'] = 'h4';
				break;
			case 3:
				$weishu_arr['weishu'] = 'bai';
				$weishu_arr['hs'] = 'h3';
				break;
			case 4:
				$weishu_arr['weishu'] = 'qian';
				$weishu_arr['hs'] = 'h2';
				break;
			case 5:
				$weishu_arr['weishu'] = 'wan';
				$weishu_arr['hs'] = 'h1';
				break;
			default:
				$weishu_arr['weishu'] = 'ge';
				$weishu_arr['hs'] = 'h5';
				break;
		}
		
		// 获取当天的所有推荐
		$tjsjModel = D ($gongshi_m);
		
// 	$where_code_key = $tjsjModel->limit(100,1)->order('code_key desc')->select()[0]['code_key'];
	$where_code_key_info = $tjsjModel->limit(500,1)->order('code_key desc')->select();
	$where_code_key = $where_code_key_info[0]['code_key'];
		if($where_code_key!=null){
			$where ['code_key'] = array (
					'gt',
					$where_code_key
			);
		}else{
			$where ['code_key']=array ('neq','');
		}
		$result_tjsj = $tjsjModel->where ( $where )->order ( 'code_key asc' )->relation ( true )->select ();
		$result_arr = array ();
		for($i = 0; $i < count ( $result_tjsj ); $i ++) {
			$yc_ge = substr ( $result_tjsj [$i][$weishu_arr['weishu']], 0, $disnum ); // 个位预测
			$i_bq = ( int ) substr ( $result_tjsj [$i] ['code_key'], - 3 ); // 本期1
			if (($i_bq + $zhouqi - 1) > 120) {
				$i_jzq = $i_bq + $zhouqi - 1 - 120;
			} else {
				$i_jzq = $i_bq + $zhouqi - 1;
			}
			$yc_ge_ds = '';
			if($yc_ge%2==0){
				$yc_ge_ds = '双';
			}else {
				$yc_ge_ds = '单';
			}
			$data ['yc'] = $yc_ge_ds;
			$data ['jiqj'] = substr_replace ( "000", ($i_bq), - strlen ( ($i_bq) ) ) . '-' . substr_replace ( "000", $i_jzq, - strlen ( $i_jzq ) ) . '期';
			
			// 对已开奖的结算
			$max = $i + $zhouqi - 1;
			if ($result_tjsj [$max] ['code'] != null) { // 没开奖的不能统计
				
				if ($zhouqi == 1) {
// 					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
						// 计划结果
						$jieguo = '中';
						$jiezhi = '第1期-' . substr_replace ( "000", ($i_bq), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else {
						$jieguo = '挂';
						$jiezhi = '第1期-' . substr_replace ( "000", ($i_bq), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					}
				} else if ($zhouqi == 2) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						// 计划结果
						$jieguo = '中';
						$jiezhi = '第1期-' . substr_replace ( "000", ($i_bq), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$jieguo = '中';
						$jiezhi = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq + 1) ) ) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
						$i = $i + 1;
					} else {
						$jieguo = '挂';
						$jiezhi = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq + 1) ) ) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
						$i = $i + 1;
					}
				} else if ($zhouqi == 3) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						// 计划结果
						$jieguo = '中';
						$jiezhi = '第1期-' . substr_replace ( "000", ($i_bq), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$jieguo = '中';
						$jiezhi = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq + 1) ) ) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$jieguo = '中';
						$jiezhi = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq + 2) ) ) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
						$i = $i + 2;
					} else {
						$jieguo = '挂';
						$jiezhi = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq + 2) ) ) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
						$i = $i + 2;
					}
				} else if ($zhouqi == 4) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						// 计划结果
						$jieguo = '中';
						$jiezhi = '第1期-' . substr_replace ( "000", ($i_bq), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$jieguo = '中';
						$jiezhi = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq + 1) ) ) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$jieguo = '中';
						$jiezhi = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq + 2) ) ) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$jieguo = '中';
						$jiezhi = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq + 3) ) ) . '期-' . $result_tjsj [$i + 3] ['code'] ['hm'];
						$i = $i + 3;
					} else {
						$jieguo = '挂';
						$jiezhi = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq + 3) ) ) . '期-' . $result_tjsj [$i + 3] ['code'] ['hm'];
						$i = $i + 3;
					}
				} else if ($zhouqi == 5) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						// 计划结果
						$jieguo = '中';
						$jiezhi = '第1期-' . substr_replace ( "000", ($i_bq), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$jieguo = '中';
						$jiezhi = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq + 1) ) ) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$jieguo = '中';
						$jiezhi = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq + 2) ) ) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$jieguo = '中';
						$jiezhi = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq + 3) ) ) . '期-' . $result_tjsj [$i + 3] ['code'] ['hm'];
						$i = $i + 3;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$jieguo = '中';
						$jiezhi = '第5期-' . substr_replace ( "000", ($i_bq + 4), - strlen ( ($i_bq + 4) ) ) . '期-' . $result_tjsj [$i + 4] ['code'] ['hm'];
						$i = $i + 4;
					} else {
						$jieguo = '挂';
						$jiezhi = '第5期-' . substr_replace ( "000", ($i_bq + 4), - strlen ( ($i_bq + 4) ) ) . '期-' . $result_tjsj [$i + 4] ['code'] ['hm'];
						$i = $i + 4;
					}
				} else if ($zhouqi == 6) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						// 计划结果
						$jieguo = '中';
						$jiezhi = '第1期-' . substr_replace ( "000", ($i_bq), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$jieguo = '中';
						$jiezhi = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq + 1) ) ) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$jieguo = '中';
						$jiezhi = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq + 2) ) ) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$jieguo = '中';
						$jiezhi = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq + 3) ) ) . '期-' . $result_tjsj [$i + 3] ['code'] ['hm'];
						$i = $i + 3;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$jieguo = '中';
						$jiezhi = '第5期-' . substr_replace ( "000", ($i_bq + 4), - strlen ( ($i_bq + 4) ) ) . '期-' . $result_tjsj [$i + 4] ['code'] ['hm'];
						$i = $i + 4;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+5] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
						$jieguo = '中';
						$jiezhi = '第6期-' . substr_replace ( "000", ($i_bq + 5), - strlen ( ($i_bq + 5) ) ) . '期-' . $result_tjsj [$i + 5] ['code'] ['hm'];
						$i = $i + 5;
					}else {
						$jieguo = '挂';
						$jiezhi = '第6期-' . substr_replace ( "000", ($i_bq + 5), - strlen ( ($i_bq + 5) ) ) . '期-' . $result_tjsj [$i + 5] ['code'] ['hm'];
						$i = $i + 5;
					}
				} else if ($zhouqi == 7) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						// 计划结果
						$jieguo = '中';
						$jiezhi = '第1期-' . substr_replace ( "000", ($i_bq), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$jieguo = '中';
						$jiezhi = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq + 1) ) ) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$jieguo = '中';
						$jiezhi = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq + 2) ) ) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$jieguo = '中';
						$jiezhi = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq + 3) ) ) . '期-' . $result_tjsj [$i + 3] ['code'] ['hm'];
						$i = $i + 3;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$jieguo = '中';
						$jiezhi = '第5期-' . substr_replace ( "000", ($i_bq + 4), - strlen ( ($i_bq + 4) ) ) . '期-' . $result_tjsj [$i + 4] ['code'] ['hm'];
						$i = $i + 4;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+5] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
						$jieguo = '中';
						$jiezhi = '第6期-' . substr_replace ( "000", ($i_bq + 5), - strlen ( ($i_bq + 5) ) ) . '期-' . $result_tjsj [$i + 5] ['code'] ['hm'];
						$i = $i + 5;
					}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+6] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$jieguo = '中';
						$jiezhi = '第7期-' . substr_replace ( "000", ($i_bq + 6), - strlen ( ($i_bq + 6) ) ) . '期-' . $result_tjsj [$i + 6] ['code'] ['hm'];
						$i = $i + 6;
					}else {
						$jieguo = '挂';
						$jiezhi = '第7期-' . substr_replace ( "000", ($i_bq + 6), - strlen ( ($i_bq + 6) ) ) . '期-' . $result_tjsj [$i + 6] ['code'] ['hm'];
						$i = $i + 6;
					}
				}else if ($zhouqi == 8) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						// 计划结果
						$jieguo = '中';
						$jiezhi = '第1期-' . substr_replace ( "000", ($i_bq), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$jieguo = '中';
						$jiezhi = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq + 1) ) ) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$jieguo = '中';
						$jiezhi = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq + 2) ) ) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$jieguo = '中';
						$jiezhi = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq + 3) ) ) . '期-' . $result_tjsj [$i + 3] ['code'] ['hm'];
						$i = $i + 3;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$jieguo = '中';
						$jiezhi = '第5期-' . substr_replace ( "000", ($i_bq + 4), - strlen ( ($i_bq + 4) ) ) . '期-' . $result_tjsj [$i + 4] ['code'] ['hm'];
						$i = $i + 4;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+5] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
						$jieguo = '中';
						$jiezhi = '第6期-' . substr_replace ( "000", ($i_bq + 5), - strlen ( ($i_bq + 5) ) ) . '期-' . $result_tjsj [$i + 5] ['code'] ['hm'];
						$i = $i + 5;
					}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+6] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$jieguo = '中';
						$jiezhi = '第7期-' . substr_replace ( "000", ($i_bq + 6), - strlen ( ($i_bq + 6) ) ) . '期-' . $result_tjsj [$i + 6] ['code'] ['hm'];
						$i = $i + 6;
					}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+7] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
						$jieguo = '中';
						$jiezhi = '第8期-' . substr_replace ( "000", ($i_bq + 7), - strlen ( ($i_bq + 7) ) ) . '期-' . $result_tjsj [$i + 7] ['code'] ['hm'];
						$i = $i + 7;
					}else {
						$jieguo = '挂';
						$jiezhi = '第8期-' . substr_replace ( "000", ($i_bq + 7), - strlen ( ($i_bq + 7) ) ) . '期-' . $result_tjsj [$i + 7] ['code'] ['hm'];
						$i = $i + 7;
					}
				}else if ($zhouqi == 9) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						// 计划结果
						$jieguo = '中';
						$jiezhi = '第1期-' . substr_replace ( "000", ($i_bq), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$jieguo = '中';
						$jiezhi = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq + 1) ) ) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$jieguo = '中';
						$jiezhi = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq + 2) ) ) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$jieguo = '中';
						$jiezhi = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq + 3) ) ) . '期-' . $result_tjsj [$i + 3] ['code'] ['hm'];
						$i = $i + 3;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$jieguo = '中';
						$jiezhi = '第5期-' . substr_replace ( "000", ($i_bq + 4), - strlen ( ($i_bq + 4) ) ) . '期-' . $result_tjsj [$i + 4] ['code'] ['hm'];
						$i = $i + 4;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+5] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
						$jieguo = '中';
						$jiezhi = '第6期-' . substr_replace ( "000", ($i_bq + 5), - strlen ( ($i_bq + 5) ) ) . '期-' . $result_tjsj [$i + 5] ['code'] ['hm'];
						$i = $i + 5;
					}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+6] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$jieguo = '中';
						$jiezhi = '第7期-' . substr_replace ( "000", ($i_bq + 6), - strlen ( ($i_bq + 6) ) ) . '期-' . $result_tjsj [$i + 6] ['code'] ['hm'];
						$i = $i + 6;
					}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+7] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
						$jieguo = '中';
						$jiezhi = '第8期-' . substr_replace ( "000", ($i_bq + 7), - strlen ( ($i_bq + 7) ) ) . '期-' . $result_tjsj [$i + 7] ['code'] ['hm'];
						$i = $i + 7;
					}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+8] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$jieguo = '中';
						$jiezhi = '第9期-' . substr_replace ( "000", ($i_bq + 8), - strlen ( ($i_bq + 8) ) ) . '期-' . $result_tjsj [$i + 8] ['code'] ['hm'];
						$i = $i + 8;
					}else {
						$jieguo = '挂';
						$jiezhi = '第9期-' . substr_replace ( "000", ($i_bq + 8), - strlen ( ($i_bq + 8) ) ) . '期-' . $result_tjsj [$i + 8] ['code'] ['hm'];
						$i = $i + 8;
					}
				}else if ($zhouqi == 10) {
					if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						// 计划结果
						$jieguo = '中';
						$jiezhi = '第1期-' . substr_replace ( "000", ($i_bq), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$jieguo = '中';
						$jiezhi = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq + 1) ) ) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
						$i = $i + 1;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$jieguo = '中';
						$jiezhi = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq + 2) ) ) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
						$i = $i + 2;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$jieguo = '中';
						$jiezhi = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq + 3) ) ) . '期-' . $result_tjsj [$i + 3] ['code'] ['hm'];
						$i = $i + 3;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$jieguo = '中';
						$jiezhi = '第5期-' . substr_replace ( "000", ($i_bq + 4), - strlen ( ($i_bq + 4) ) ) . '期-' . $result_tjsj [$i + 4] ['code'] ['hm'];
						$i = $i + 4;
					} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+5] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
						$jieguo = '中';
						$jiezhi = '第6期-' . substr_replace ( "000", ($i_bq + 5), - strlen ( ($i_bq + 5) ) ) . '期-' . $result_tjsj [$i + 5] ['code'] ['hm'];
						$i = $i + 5;
					}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+6] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$jieguo = '中';
						$jiezhi = '第7期-' . substr_replace ( "000", ($i_bq + 6), - strlen ( ($i_bq + 6) ) ) . '期-' . $result_tjsj [$i + 6] ['code'] ['hm'];
						$i = $i + 6;
					}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+7] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
						$jieguo = '中';
						$jiezhi = '第8期-' . substr_replace ( "000", ($i_bq + 7), - strlen ( ($i_bq + 7) ) ) . '期-' . $result_tjsj [$i + 7] ['code'] ['hm'];
						$i = $i + 7;
					}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+8] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$jieguo = '中';
						$jiezhi = '第9期-' . substr_replace ( "000", ($i_bq + 8), - strlen ( ($i_bq + 8) ) ) . '期-' . $result_tjsj [$i + 8] ['code'] ['hm'];
						$i = $i + 8;
					}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+9] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
						$jieguo = '中';
						$jiezhi = '第10期-' . substr_replace ( "000", ($i_bq + 9), - strlen ( ($i_bq + 9) ) ) . '期-' . $result_tjsj [$i + 9] ['code'] ['hm'];
						$i = $i + 9;
					}else {
						$jieguo = '挂';
						$jiezhi = '第10期-' . substr_replace ( "000", ($i_bq + 9), - strlen ( ($i_bq + 9) ) ) . '期-' . $result_tjsj [$i + 9] ['code'] ['hm'];
						$i = $i + 9;
					}
				}
				
				
				// 计划结果,第一期不中则第二期，中则从下期开始重新推荐，如果三期都不中，则从下期重新推荐
				$data ['jiezhi'] = $jiezhi;
				$data ['jieguo'] = $jieguo;
				array_push ( $result_arr, $data );
			} else {
				// 算周期
				if ($zhouqi == 1) {
					if ($result_tjsj [$i] ['code'] == null) {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq), - strlen ( ($i_bq) ) ) . '期进行中...';
					} else if ($result_tjsj [$i + 1] ['code'] == null) {
						if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq ), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+1) ) ) . '期进行中...';
							$i = $i + 1;
						}
					}
					array_push ( $result_arr, $data );
				} else if ($zhouqi == 2) {
					if ($result_tjsj [$i] ['code'] == null) {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq), - strlen ( ($i_bq) ) ) . '期进行中...';
					} else if ($result_tjsj [$i + 1] ['code'] == null) {
						if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq ), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+1) ) ) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+1) ) ) . '期进行中...';
							$i = $i + 1;
						}
					}
					array_push ( $result_arr, $data );
				} else if ($zhouqi == 3) {
					if ($result_tjsj [$i] ['code'] == null) {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq), - strlen ( ($i_bq) ) ) . '期进行中...';
					} else if ($result_tjsj [$i + 1] ['code'] == null) {
						if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq ), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+1) ) ) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+1) ) ) . '期进行中...';
							$i = $i + 1;
						}
					} else if ($result_tjsj [$i + 2] ['code'] == null) {
						if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq ), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+1) ) ) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq+2) ) ) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq+2) ) ) . '期进行中...';
							$i = $i + 2;
						}
					}
					array_push ( $result_arr, $data );
				} else if ($zhouqi == 4) {
					if ($result_tjsj [$i] ['code'] == null) {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq), - strlen ( ($i_bq) ) ) . '期进行中...';
					} else if ($result_tjsj [$i + 1] ['code'] == null) {
						if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq ), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+1) ) ) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+1) ) ) . '期进行中...';
							$i = $i + 1;
						}
					} else if ($result_tjsj [$i + 2] ['code'] == null) {
						if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq ), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+1) ) ) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq+2) ) ) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq) ) ) . '期进行中...';
							$i = $i + 2;
						}
					} else if ($result_tjsj [$i + 3] ['code'] == null) {
						if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq ), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+1) ) ) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq+2) ) ) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq+3) ) ) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq+3) ) ) . '期进行中...';
							$i = $i + 3;
						}
					}
					array_push ( $result_arr, $data );
				} else if ($zhouqi == 5) {
					if ($result_tjsj [$i] ['code'] == null) {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq), - strlen ( ($i_bq) ) ) . '期进行中...';
					} else if ($result_tjsj [$i + 1] ['code'] == null) {
						if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq ), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+1) ) ) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+1) ) ) . '期进行中...';
							$i = $i + 1;
						}
					} else if ($result_tjsj [$i + 2] ['code'] == null) {
						if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq ), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+1) ) ) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq+2) ) ) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq+2) ) ) . '期进行中...';
							$i = $i + 2;
						}
					} else if ($result_tjsj [$i + 3] ['code'] == null) {
						if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+1) ) ) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq+2) ) ) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq+3) ) ) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq+3) ) ) . '期进行中...';
							$i = $i + 3;
						}
					} else if ($result_tjsj [$i + 4] ['code'] == null) {
						if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq ), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+1) ) ) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq+2) ) ) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq+3) ) ) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第5期-' . substr_replace ( "000", ($i_bq + 4), - strlen ( ($i_bq+4) ) ) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
							$i = $i + 4;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第5期-' . substr_replace ( "000", ($i_bq + 4), - strlen ( ($i_bq+4) ) ) . '期进行中...';
							$i = $i + 4;
						}
					}
					array_push ( $result_arr, $data );
				}else if ($zhouqi == 6) {
					if ($result_tjsj [$i] ['code'] == null) {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq), - strlen ( ($i_bq) ) ) . '期进行中...';
					} else if ($result_tjsj [$i + 1] ['code'] == null) {
						if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq ), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+1) ) ) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+1) ) ) . '期进行中...';
							$i = $i + 1;
						}
					} else if ($result_tjsj [$i + 2] ['code'] == null) {
						if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq ), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+1) ) ) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq+2) ) ) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq+2) ) ) . '期进行中...';
							$i = $i + 2;
						}
					} else if ($result_tjsj [$i + 3] ['code'] == null) {
						if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq ), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+1) ) ) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq+2) ) ) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq+3) ) ) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq+3) ) ) . '期进行中...';
							$i = $i + 3;
						}
					} else if ($result_tjsj [$i + 4] ['code'] == null) {
						if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq ), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+1) ) ) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq+2) ) ) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq+3) ) ) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第5期-' . substr_replace ( "000", ($i_bq + 4), - strlen ( ($i_bq+4) ) ) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
							$i = $i + 4;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第5期-' . substr_replace ( "000", ($i_bq + 4), - strlen ( ($i_bq+4) ) ) . '期进行中...';
							$i = $i + 4;
						}
					} else if ($result_tjsj [$i + 5] ['code'] == null) {
						if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+ 1) ) ) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq+ 2) ) ) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq+ 3) ) ) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第5期-' . substr_replace ( "000", ($i_bq + 4), - strlen ( ($i_bq+ 4) ) ) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
							$i = $i + 4;
						}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+5] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第6期-' . substr_replace ( "000", ($i_bq + 5), - strlen ( ($i_bq+ 5) ) ) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
							$i = $i + 5;
						}  else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第6期-' . substr_replace ( "000", ($i_bq + 5), - strlen ( ($i_bq+ 5) ) ) . '期进行中...';
							$i = $i + 5;
						}
					}
					array_push ( $result_arr, $data );
				}else if ($zhouqi == 7) {
					if ($result_tjsj [$i] ['code'] == null) {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq), - strlen ( ($i_bq) ) ) . '期进行中...';
					} else if ($result_tjsj [$i + 1] ['code'] == null) {
						if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq ), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+1) ) ) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+1) ) ) . '期进行中...';
							$i = $i + 1;
						}
					} else if ($result_tjsj [$i + 2] ['code'] == null) {
						if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq ), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+1) ) ) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq+2) ) ) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq+2) ) ) . '期进行中...';
							$i = $i + 2;
						}
					} else if ($result_tjsj [$i + 3] ['code'] == null) {
						if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+1) ) ) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq+2) ) ) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq+3) ) ) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq+3) ) ) . '期进行中...';
							$i = $i + 3;
						}
					} else if ($result_tjsj [$i + 4] ['code'] == null) {
						if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq ), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+1) ) ) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq+2) ) ) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq+3) ) ) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第5期-' . substr_replace ( "000", ($i_bq + 4), - strlen ( ($i_bq+4) ) ) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
							$i = $i + 4;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第5期-' . substr_replace ( "000", ($i_bq + 4), - strlen ( ($i_bq+4) ) ) . '期进行中...';
							$i = $i + 4;
						}
					} else if ($result_tjsj [$i + 5] ['code'] == null) {
						if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq ), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+ 1) ) ) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq+ 2) ) ) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq+ 3) ) ) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第5期-' . substr_replace ( "000", ($i_bq + 4), - strlen ( ($i_bq+ 4) ) ) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
							$i = $i + 4;
						}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+5] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第6期-' . substr_replace ( "000", ($i_bq + 5), - strlen ( ($i_bq+ 5) ) ) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
							$i = $i + 5;
						}  else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第6期-' . substr_replace ( "000", ($i_bq + 5), - strlen ( ($i_bq+ 5) ) ) . '期进行中...';
							$i = $i + 5;
						}
					} else if ($result_tjsj [$i + 6] ['code'] == null) {
						if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq ), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+ 1) ) ) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq+ 2) ) ) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq+ 3) ) ) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第5期-' . substr_replace ( "000", ($i_bq + 4), - strlen ( ($i_bq+ 4) ) ) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
							$i = $i + 4;
						}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+5] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第6期-' . substr_replace ( "000", ($i_bq + 5), - strlen ( ($i_bq+ 5) ) ) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
							$i = $i + 5;
						}  else if( $yc_ge%2 == (substr ( $result_tjsj[$i+6] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第7期-' . substr_replace ( "000", ($i_bq + 6), - strlen ( ($i_bq+ 6) ) ) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
							$i = $i + 6;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第7期-' . substr_replace ( "000", ($i_bq + 6), - strlen ( ($i_bq+ 6) ) ) . '期进行中...';
							$i = $i + 6;
						}
					}
					array_push ( $result_arr, $data );
				}else if ($zhouqi ==8) {
					if ($result_tjsj [$i] ['code'] == null) {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq), - strlen ( ($i_bq) ) ) . '期进行中...';
					} else if ($result_tjsj [$i + 1] ['code'] == null) {
						if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq ), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+1) ) ) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+1) ) ) . '期进行中...';
							$i = $i + 1;
						}
					} else if ($result_tjsj [$i + 2] ['code'] == null) {
						if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq ), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+1) ) ) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq+2) ) ) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq+2) ) ) . '期进行中...';
							$i = $i + 2;
						}
					} else if ($result_tjsj [$i + 3] ['code'] == null) {
						if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq ), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+1) ) ) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq+2) ) ) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq+3) ) ) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq+3) ) ) . '期进行中...';
							$i = $i + 3;
						}
					} else if ($result_tjsj [$i + 4] ['code'] == null) {
						if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq ), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+1) ) ) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq+2) ) ) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq+3) ) ) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第5期-' . substr_replace ( "000", ($i_bq + 4), - strlen ( ($i_bq+4) ) ) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
							$i = $i + 4;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第5期-' . substr_replace ( "000", ($i_bq + 4), - strlen ( ($i_bq+4) ) ) . '期进行中...';
							$i = $i + 4;
						}
					} else if ($result_tjsj [$i + 5] ['code'] == null) {
						if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq ), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+ 1) ) ) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq+ 2) ) ) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq+ 3) ) ) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第5期-' . substr_replace ( "000", ($i_bq + 4), - strlen ( ($i_bq+ 4) ) ) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
							$i = $i + 4;
						}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+5] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第6期-' . substr_replace ( "000", ($i_bq + 5), - strlen ( ($i_bq+ 5) ) ) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
							$i = $i + 5;
						}  else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第6期-' . substr_replace ( "000", ($i_bq + 5), - strlen ( ($i_bq+ 5) ) ) . '期进行中...';
							$i = $i + 5;
						}
					} else if ($result_tjsj [$i + 6] ['code'] == null) {
						if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq ), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+ 1) ) ) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq+ 2) ) ) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq+ 3) ) ) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第5期-' . substr_replace ( "000", ($i_bq + 4), - strlen ( ($i_bq+ 4) ) ) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
							$i = $i + 4;
						}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+5] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第6期-' . substr_replace ( "000", ($i_bq + 5), - strlen ( ($i_bq+ 5) ) ) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
							$i = $i + 5;
						}  else if( $yc_ge%2 == (substr ( $result_tjsj[$i+6] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第7期-' . substr_replace ( "000", ($i_bq + 6), - strlen ( ($i_bq+ 6) ) ) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
							$i = $i + 6;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第7期-' . substr_replace ( "000", ($i_bq + 6), - strlen ( ($i_bq+ 6) ) ) . '期进行中...';
							$i = $i + 6;
						}
					}else if ($result_tjsj [$i + 7] ['code'] == null) {
						if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq ), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+ 1) ) ) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq+ 2) ) ) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq+ 3) ) ) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第5期-' . substr_replace ( "000", ($i_bq + 4), - strlen ( ($i_bq+ 4) ) ) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
							$i = $i + 4;
						}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+5] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第6期-' . substr_replace ( "000", ($i_bq + 5), - strlen ( ($i_bq+ 5) ) ) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
							$i = $i + 5;
						}  else if( $yc_ge%2 == (substr ( $result_tjsj[$i+6] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第7期-' . substr_replace ( "000", ($i_bq + 6), - strlen ( ($i_bq+ 6) ) ) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
							$i = $i + 6;
						}  else if( $yc_ge%2 == (substr ( $result_tjsj[$i+7] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第8期-' . substr_replace ( "000", ($i_bq + 7), - strlen ( ($i_bq+ 7) ) ) . '期-' . $result_tjsj [$i+7] ['code'] ['hm'];
							$i = $i + 7;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第8期-' . substr_replace ( "000", ($i_bq + 7), - strlen ( ($i_bq+ 7) ) ) . '期进行中...';
							$i = $i + 7;
						}
					}
					array_push ( $result_arr, $data );
				}else if ($zhouqi ==9) {
					if ($result_tjsj [$i] ['code'] == null) {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq), - strlen ( ($i_bq) ) ) . '期进行中...';
					} else if ($result_tjsj [$i + 1] ['code'] == null) {
						if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq ), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+1) ) ) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+1) ) ) . '期进行中...';
							$i = $i + 1;
						}
					} else if ($result_tjsj [$i + 2] ['code'] == null) {
						if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq ), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+1) ) ) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq+2) ) ) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq+2) ) ) . '期进行中...';
							$i = $i + 2;
						}
					} else if ($result_tjsj [$i + 3] ['code'] == null) {
						if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq ), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+1) ) ) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq+2) ) ) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq+2) ) ) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq) ) ) . '期进行中...';
							$i = $i + 3;
						}
					} else if ($result_tjsj [$i + 4] ['code'] == null) {
						if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq ), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+1) ) ) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq+2) ) ) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq+3) ) ) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第5期-' . substr_replace ( "000", ($i_bq + 4), - strlen ( ($i_bq+4) ) ) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
							$i = $i + 4;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第5期-' . substr_replace ( "000", ($i_bq + 4), - strlen ( ($i_bq+4) ) ) . '期进行中...';
							$i = $i + 4;
						}
					} else if ($result_tjsj [$i + 5] ['code'] == null) {
						if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq ), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+ 1) ) ) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq+ 2) ) ) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq+ 3) ) ) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第5期-' . substr_replace ( "000", ($i_bq + 4), - strlen ( ($i_bq+ 4) ) ) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
							$i = $i + 4;
						}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+5] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第6期-' . substr_replace ( "000", ($i_bq + 5), - strlen ( ($i_bq+ 5) ) ) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
							$i = $i + 5;
						}  else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第6期-' . substr_replace ( "000", ($i_bq + 5), - strlen ( ($i_bq+ 5) ) ) . '期进行中...';
							$i = $i + 5;
						}
					} else if ($result_tjsj [$i + 6] ['code'] == null) {
						if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq ), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+ 1) ) ) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq+ 2) ) ) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq+ 3) ) ) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第5期-' . substr_replace ( "000", ($i_bq + 4), - strlen ( ($i_bq+ 4) ) ) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
							$i = $i + 4;
						}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+5] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第6期-' . substr_replace ( "000", ($i_bq + 5), - strlen ( ($i_bq+ 5) ) ) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
							$i = $i + 5;
						}  else if( $yc_ge%2 == (substr ( $result_tjsj[$i+6] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第7期-' . substr_replace ( "000", ($i_bq + 6), - strlen ( ($i_bq+ 6) ) ) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
							$i = $i + 6;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第7期-' . substr_replace ( "000", ($i_bq + 6), - strlen ( ($i_bq+ 6) ) ) . '期进行中...';
							$i = $i + 6;
						}
					}else if ($result_tjsj [$i + 7] ['code'] == null) {
						if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq ), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+ 1) ) ) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq+ 2) ) ) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq+ 3) ) ) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第5期-' . substr_replace ( "000", ($i_bq + 4), - strlen ( ($i_bq+ 4) ) ) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
							$i = $i + 4;
						}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+5] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第6期-' . substr_replace ( "000", ($i_bq + 5), - strlen ( ($i_bq+ 5) ) ) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
							$i = $i + 5;
						}  else if( $yc_ge%2 == (substr ( $result_tjsj[$i+6] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第7期-' . substr_replace ( "000", ($i_bq + 6), - strlen ( ($i_bq+ 6) ) ) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
							$i = $i + 6;
						}  else if( $yc_ge%2 == (substr ( $result_tjsj[$i+7] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第8期-' . substr_replace ( "000", ($i_bq + 7), - strlen ( ($i_bq+ 7) ) ) . '期-' . $result_tjsj [$i+7] ['code'] ['hm'];
							$i = $i + 7;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第8期-' . substr_replace ( "000", ($i_bq + 7), - strlen ( ($i_bq+ 7) ) ) . '期进行中...';
							$i = $i + 7;
						}
					}else if ($result_tjsj [$i + 8] ['code'] == null) {
						if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq ), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+ 1) ) ) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq+ 2) ) ) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq+ 3) ) ) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第5期-' . substr_replace ( "000", ($i_bq + 4), - strlen ( ($i_bq+ 4) ) ) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
							$i = $i + 4;
						}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+5] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第6期-' . substr_replace ( "000", ($i_bq + 5), - strlen ( ($i_bq+ 5) ) ) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
							$i = $i + 5;
						}  else if( $yc_ge%2 == (substr ( $result_tjsj[$i+6] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第7期-' . substr_replace ( "000", ($i_bq + 6), - strlen ( ($i_bq+ 6) ) ) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
							$i = $i + 6;
						}  else if( $yc_ge%2 == (substr ( $result_tjsj[$i+7] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第8期-' . substr_replace ( "000", ($i_bq + 7), - strlen ( ($i_bq+ 7) ) ) . '期-' . $result_tjsj [$i+7] ['code'] ['hm'];
							$i = $i + 7;
						}  else if( $yc_ge%2 == (substr ( $result_tjsj[$i+8] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第9期-' . substr_replace ( "000", ($i_bq + 8), - strlen ( ($i_bq+ 8) ) ) . '期-' . $result_tjsj [$i+8] ['code'] ['hm'];
							$i = $i + 8;
						}else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第9期-' . substr_replace ( "000", ($i_bq + 8), - strlen ( ($i_bq+ 8) ) ) . '期进行中...';
							$i = $i + 8;
						}
					}
					array_push ( $result_arr, $data );
				}else if ($zhouqi ==10) {
					if ($result_tjsj [$i] ['code'] == null) {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq), - strlen ( ($i_bq) ) ) . '期进行中...';
					} else if ($result_tjsj [$i + 1] ['code'] == null) {
						if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq ), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+1) ) ) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+1) ) ) . '期进行中...';
							$i = $i + 1;
						}
					} else if ($result_tjsj [$i + 2] ['code'] == null) {
						if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq ), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+1) ) ) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq+2) ) ) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq+2) ) ) . '期进行中...';
							$i = $i + 2;
						}
					} else if ($result_tjsj [$i + 3] ['code'] == null) {
						if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq ), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+1) ) ) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq+2) ) ) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq+3) ) ) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq+3) ) ) . '期进行中...';
							$i = $i + 3;
						}
					} else if ($result_tjsj [$i + 4] ['code'] == null) {
						if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq ), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+1) ) ) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq+2) ) ) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq+3) ) ) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第5期-' . substr_replace ( "000", ($i_bq + 4), - strlen ( ($i_bq+4) ) ) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
							$i = $i + 4;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第5期-' . substr_replace ( "000", ($i_bq + 4), - strlen ( ($i_bq+4) ) ) . '期进行中...';
							$i = $i + 4;
						}
					} else if ($result_tjsj [$i + 5] ['code'] == null) {
						if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq ), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+ 1) ) ) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq+ 2) ) ) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq+ 3) ) ) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第5期-' . substr_replace ( "000", ($i_bq + 4), - strlen ( ($i_bq+ 4) ) ) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
							$i = $i + 4;
						}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+5] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第6期-' . substr_replace ( "000", ($i_bq + 5), - strlen ( ($i_bq+ 5) ) ) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
							$i = $i + 5;
						}  else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第6期-' . substr_replace ( "000", ($i_bq + 5), - strlen ( ($i_bq+ 5) ) ) . '期进行中...';
							$i = $i + 5;
						}
					} else if ($result_tjsj [$i + 6] ['code'] == null) {
						if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq ), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+ 1) ) ) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq+ 2) ) ) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq+ 3) ) ) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第5期-' . substr_replace ( "000", ($i_bq + 4), - strlen ( ($i_bq+ 4) ) ) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
							$i = $i + 4;
						}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+5] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第6期-' . substr_replace ( "000", ($i_bq + 5), - strlen ( ($i_bq+ 5) ) ) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
							$i = $i + 5;
						}  else if( $yc_ge%2 == (substr ( $result_tjsj[$i+6] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第7期-' . substr_replace ( "000", ($i_bq + 6), - strlen ( ($i_bq+ 6) ) ) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
							$i = $i + 6;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第7期-' . substr_replace ( "000", ($i_bq + 6), - strlen ( ($i_bq+ 6) ) ) . '期进行中...';
							$i = $i + 6;
						}
					}else if ($result_tjsj [$i + 7] ['code'] == null) {
						if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq ), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+ 1) ) ) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq+ 2) ) ) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq+ 3) ) ) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第5期-' . substr_replace ( "000", ($i_bq + 4), - strlen ( ($i_bq+ 4) ) ) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
							$i = $i + 4;
						}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+5] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第6期-' . substr_replace ( "000", ($i_bq + 5), - strlen ( ($i_bq+ 5) ) ) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
							$i = $i + 5;
						}  else if( $yc_ge%2 == (substr ( $result_tjsj[$i+6] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第7期-' . substr_replace ( "000", ($i_bq + 6), - strlen ( ($i_bq+ 6) ) ) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
							$i = $i + 6;
						}  else if( $yc_ge%2 == (substr ( $result_tjsj[$i+7] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第8期-' . substr_replace ( "000", ($i_bq + 7), - strlen ( ($i_bq+ 7) ) ) . '期-' . $result_tjsj [$i+7] ['code'] ['hm'];
							$i = $i + 7;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第8期-' . substr_replace ( "000", ($i_bq + 7), - strlen ( ($i_bq+ 7) ) ) . '期进行中...';
							$i = $i + 7;
						}
					}else if ($result_tjsj [$i + 8] ['code'] == null) {
						if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq ), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+ 1) ) ) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq+ 2) ) ) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq+ 3) ) ) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第5期-' . substr_replace ( "000", ($i_bq + 4), - strlen ( ($i_bq+ 4) ) ) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
							$i = $i + 4;
						}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+5] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第6期-' . substr_replace ( "000", ($i_bq + 5), - strlen ( ($i_bq+ 5) ) ) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
							$i = $i + 5;
						}  else if( $yc_ge%2 == (substr ( $result_tjsj[$i+6] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第7期-' . substr_replace ( "000", ($i_bq + 6), - strlen ( ($i_bq+ 6) ) ) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
							$i = $i + 6;
						}  else if( $yc_ge%2 == (substr ( $result_tjsj[$i+7] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第8期-' . substr_replace ( "000", ($i_bq + 7), - strlen ( ($i_bq+ 7) ) ) . '期-' . $result_tjsj [$i+7] ['code'] ['hm'];
							$i = $i + 7;
						}  else if( $yc_ge%2 == (substr ( $result_tjsj[$i+8] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第9期-' . substr_replace ( "000", ($i_bq + 8), - strlen ( ($i_bq+ 8) ) ) . '期-' . $result_tjsj [$i+8] ['code'] ['hm'];
							$i = $i + 8;
						}else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第9期-' . substr_replace ( "000", ($i_bq + 8), - strlen ( ($i_bq+ 8) ) ) . '期进行中...';
							$i = $i + 8;
						}
					}else if ($result_tjsj [$i + 9] ['code'] == null) {
						if( $yc_ge%2 == (substr ( $result_tjsj[$i] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . substr_replace ( "000", ($i_bq ), - strlen ( ($i_bq) ) ) . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+1] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . substr_replace ( "000", ($i_bq + 1), - strlen ( ($i_bq+ 1) ) ) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+2] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq+ 2) ) ) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+3] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq+ 3) ) ) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else if( $yc_ge%2 == (substr ( $result_tjsj[$i+4] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第5期-' . substr_replace ( "000", ($i_bq + 4), - strlen ( ($i_bq+ 4) ) ) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
							$i = $i + 4;
						}else if( $yc_ge%2 == (substr ( $result_tjsj[$i+5] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第6期-' . substr_replace ( "000", ($i_bq + 5), - strlen ( ($i_bq+ 5) ) ) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
							$i = $i + 5;
						}  else if( $yc_ge%2 == (substr ( $result_tjsj[$i+6] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第7期-' . substr_replace ( "000", ($i_bq + 6), - strlen ( ($i_bq+ 6) ) ) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
							$i = $i + 6;
						}  else if( $yc_ge%2 == (substr ( $result_tjsj[$i+7] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)){
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第8期-' . substr_replace ( "000", ($i_bq + 7), - strlen ( ($i_bq+ 7) ) ) . '期-' . $result_tjsj [$i+7] ['code'] ['hm'];
							$i = $i + 7;
						}  else if( $yc_ge%2 == (substr ( $result_tjsj[$i+8] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第9期-' . substr_replace ( "000", ($i_bq + 8), - strlen ( ($i_bq+ 8) ) ) . '期-' . $result_tjsj [$i+8] ['code'] ['hm'];
							$i = $i + 8;
						}  else if( $yc_ge%2 == (substr ( $result_tjsj[$i+9] ['code'] [$weishu_arr['hs']], 0, $disnum )%2)) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第10期-' . substr_replace ( "000", ($i_bq + 9), - strlen ( ($i_bq+ 9) ) ) . '期-' . $result_tjsj [$i+9] ['code'] ['hm'];
							$i = $i + 9;
						}else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第10期-' . substr_replace ( "000", ($i_bq + 9), - strlen ( ($i_bq+ 9) ) ) . '期进行中...';
							$i = $i + 9;
						}
					}
					array_push ( $result_arr, $data );
				}
			}
		}
		
		//只留前30期
		if(I("zqnum")==null){
			$zqnum = 30;
		}else{
			$zqnum = I("zqnum");
		}
		$zqshengyu = count($result_arr)-$zqnum;
		foreach ($result_arr as $k_del => $v_del) {
			if($k_del<($zqshengyu-1)){
				unset($result_arr[$k_del]);
			}
		}
		//统计中挂个数
		$zhong = 0;
		$gua = 0;
		foreach ( $result_arr as $key => $value ) {
			if ($value ['jieguo'] == '中') {
				$zhong ++;
			} else if ($value ['jieguo'] == '挂') {
				$gua ++;
			}
		}
		
		$result_sl ['zhong'] = $zhong;
		$result_sl ['gua'] = $gua;
		$result_sl ['tatol'] = $zhong + $gua;
		$result_sl ['sl'] = number_format ( ($zhong / ($zhong + $gua)) * 100, 2, '.', '' );
		$this->list = $result_arr;
		$this->sl = $result_sl;
		$this->disnum = $disnum;//定码
		$this->zhouqi = $zhouqi;//周期
		$this->gongshi = $gongshi;//公式
		$this->weishu = $weishu;//位数，54321=万千百十个
		$this->zqnum = $zqnum;//查看周期
		
		$this->display ("ds");
		// dump($result_sl);
		// dump($result_arr[0]);
	}
}








